<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



        <ui:composition template="./../Template/AdminTemplate.xhtml"
                        xmlns="http://www.w3.org/1999/xhtml"
                        xmlns:ui="http://java.sun.com/jsf/facelets"
                        xmlns:f="http://java.sun.com/jsf/core"
                        xmlns:h="http://java.sun.com/jsf/html"
                        xmlns:p="http://primefaces.org/ui">

            <ui:define name="content">
                
                    <h:form enctype="multipart/form-data">
                        <p:panel id="panel" header="Change #{userControl.user.fullName} 's Password">
                            
                            <h:panelGrid columns="2">                                
                                
                                <h:outputLabel value=" New Password:" for="password1" />
                                    <p:password id="password1" value="#{userControl.user.passWord}" match="password2" label="Password" required="true">
                                        <f:validateLength minimum="6"/>
                                        <p:message id="msp1" for="password1" display="Password is not be empty "/>
                                    </p:password>
                                
                                    <h:outputLabel value="New Confirm Password:" for="password2" />
                                    <p:password id="password2" value="#{userControl.user.passWord}" label="Password2" required="true">
                                        <p:message id="msp2" for="password2" display="Confirm Password should match with Password"/>
                                    </p:password>
                                    
                                    <p:commandButton value="Change" actionListener="#{userControl.updatepassword(userControl.user)}" update="panel" icon="ui-icon-disk"/>
                                    <p:commandButton value="Reset" type="reset"/>
                            </h:panelGrid>
                        </p:panel>
                    </h:form>
               
            </ui:define>

        </ui:composition>

